Skip to content

Conversation

@dhardy
Copy link
Member

@dhardy dhardy commented Dec 9, 2025

  • Added a CHANGELOG.md entry

Summary

Add fn drop to trait Generator

Motivation

See this comment.

This allows the generator to add a destruction hook such as a call to zeroize the output buffer.

@baloo I think this suffices for the needs of chacha20?

@dhardy
Copy link
Member Author

dhardy commented Dec 9, 2025

I do not wish to add a zeroize dependency to rand_core, but would still prefer to constrain the buffer type to [W; N].

An alternative is the unconstrained-buffer approach formerly used in #24, though we moved away from that approach for a good reason.

Copy link
Contributor

@baloo baloo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baloo/stream-ciphers@567a567

That works! Thanks!

@dhardy
Copy link
Member Author

dhardy commented Dec 10, 2025

Good, we have a solution.

@dhardy dhardy merged commit f9790b2 into master Dec 10, 2025
13 checks passed
@dhardy dhardy deleted the drop branch December 10, 2025 07:57
@dhardy dhardy mentioned this pull request Dec 10, 2025
1 task
@newpavlov
Copy link
Member

As I wrote here, I really don't like this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants